-- apply_skill
-- created by dengc
-- 每回合收集能量，收集速度受生命值影响

return {
    apply = function(prop, baseValue)
        return prop[3];
    end,

    -- 每回合触发
    trigger = function(who, prop, arg)
        -- 找到玩家
        local target = ME.user;
        if target:isDead() then
            return true;
        end

        -- 不能触发
        if FormulaM.invoke("CAN_MONSTER_ACTIVE_ATTACK", who, prop) then
            return true;
        end

        -- 释放技能
        SkillM.apply(who, target, prop[3], CombatM.getRound());

        return true;
    end,

    record = function(target, prop, path)
        return false;
    end
};